  <script type="text/javascript">
    _editor_url  = "<?=$this->GetConfigValue('xinha_path');?>";
    _editor_lang = "en";      // And the language we need to use in the editor.
    _editor_skin = 'blue-metallic';
  </script>

  <!-- Load up the actual editor core -->
  <script type="text/javascript" src="<?=$this->GetConfigValue('xinha_path');?>htmlarea.js"></script>

  <script type="text/javascript">
    xinha_editors = null;
    xinha_init    = null;
    xinha_config  = null;
    xinha_plugins = null;

    // This contains the names of textareas we will make into Xinha editors
    xinha_init = xinha_init ? xinha_init : function()
    {
      xinha_plugins = xinha_plugins ? xinha_plugins :
      [
  'ContextMenu',
	'EnterParagraphs',
	'FindReplace',
	'FullScreen',
	'GetHtml',
	'HorizontalRule',
	'InsertAnchor',
	'ListType',
	'PasteText',
	'TableOperations',
	'UnFormat',
  'Stylist'
      ];
             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :)
             if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;

      xinha_editors = xinha_editors ? xinha_editors :
      [
        'body'
      ];
       xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
       xinha_config.stylistLoadStylesheet('<?=$this->GetConfigValue("theme_url")?>css/wakka.css');
      xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);

      xinha_editors.body.config.pageStyle = "<?=$this->GetConfigValue("theme_url")?>css/wakka.css"
      
      HTMLArea.startEditors(xinha_editors);
      window.onload = null;
    }
    window.onload   = xinha_init;
  </script>
